package com.wanmait.recruit.mapper;

import com.wanmait.recruit.pojo.Person;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

public interface PersonMapper {

    Person selectByEmail(String email);
    Person selectByPersonName(String personName);
    Person selectByCode(String code);
    int deleteByPrimaryKey(Integer id);

    int insert(Person record);

    int insertSelective(Person record);

    Person selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Person record);

    int updateByPrimaryKey(Person record);

    Person selectByPersonNameAndPassword(@Param("personName") String personName, @Param("password") String password);
    Person selectByPhoneAndPassword(@Param("phone") String phone,@Param("password") String password);
    Person selectByEmailAndPassword(@Param("email") String email,@Param("password") String password);
    Person findByPersonName(String personName);
    int updatePersonInfo(Person person);
    int updatePersonPic(@Param("personId") Integer Integer, @Param("pic") String pic);
    int updatePersonNameAndPassword(@Param("personId") Integer id, @Param("personName") String personName,@Param("password") String password);

    ArrayList<Person> findAll();

}